// import 'babel-core'
import 'babel-polyfill'
import promise from 'es6-promise'
 promise.polyfill()
//  require('es6-promise').polyfill()

import Vue from 'vue'
import App from './App.vue'
// 引入 flexible 用于设置 rem 基准值
import 'lib-flexible/flexible.js'



// import Vant from 'vant';
import 'vant/lib/index.css';

// Vue.use(Vant);

import {  NavBar,Icon,Button,Cell, CellGroup ,Popup ,Checkbox, CheckboxGroup,DatetimePicker, Field, Form,Picker,RadioGroup, Radio,Uploader,Loading,ImagePreview,Area } from 'vant';
Vue.use(NavBar).use(Icon).use(Button).use(Cell)
.use(CellGroup).use(Popup).use(Checkbox).use(CheckboxGroup).use(DatetimePicker).use(Field).use(Form).use(Picker).use(RadioGroup).use(Radio).use(Uploader).use(Loading).use(ImagePreview).use(Area)

import Vuex from 'vuex';
import vuexI18n from 'vuex-i18n';
Vue.use(Vuex);
const store = new Vuex.Store({
    modules: {
        i18n1: vuexI18n.store
    }
});
Vue.use(vuexI18n.plugin, store);
const translationsEn = {
    "content": "This is some {type} content"
};
 
// translations can be kept in separate files for each language
// i.e. resources/i18n/de.json.
// add translations directly to the application

Vue.i18n.add('en', translationsEn);
 
// set the start locale to use
Vue.i18n.set('en');

import  VConsole  from  'vconsole';
new VConsole();
import router from './router'


//移动端点击延迟
// const FastClick = require('fastclick')
// FastClick.attach(document.body)
Vue.config.productionTip = false

// Vue.filter(
//   "formDataType",function(value){
//     if(value==0){
//       return '自定义'
//     }else if(value==1){
//       return '请假'
//     }else if(value==2){
//       return '出差'
//     }else if(value==3){
//       return '加班'
//     }else if(value==4){
//       return '换班'
//     }else if(value==5){
//       return '补卡'
//     }else if(value==6){
//       return '外出'
//     }else{
//       return '外出'
//     }
//     return '外出'
//   }
// )
// Vue.filter(
//   "formDataStatus",function(value){
//     if(value==1){
//       return '审批中2'
//     }else if(value==2){
//       return '通过'
//     }else if(value==3){
//       return '拒绝'
//     }else if(value==4){
//       return '撤销'
//     }else{
//       return '撤销'
//     }
//   },
// )
new Vue({
  router,
//   store,
  render: h => h(App),
}).$mount('#app')
